home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pcv05n09.zip / FIXLIST.BAT next >
DOS Batch File  |  1993-06-13  |  1KB  |  43 lines

  1. @echo off
  2. cls
  3. rem      FIXLIST.BAT   line deletion routine for LST.TXT files
  4. if %1!==! goto :trap
  5. echo                         ~~~~~~~~~~~~~~~~~~~~~
  6. echo                                FIXLIST  
  7. echo                         ~~~~~~~~~~~~~~~~~~~~~
  8. echo     Line deletion routine for phone numbers that are no longer needed.
  9. echo                               .........
  10. echo     **** CTRL-C or CTRL-BREAK to exit without deleting numbers. ****
  11. echo          (A copy of the original file will be saved as LST.OLD)
  12. echo                               .........
  13. echo     Press any key to delete the line.
  14. pause > nul
  15. copy c:\batch\lst.txt c:\batch\lst.old
  16. find /v "%1" < c:\batch\lst.txt > lst.###
  17. sort < lst.### > c:\batch\lst.sor
  18. copy lst.### c:\batch\lst.txt
  19. del lst.###
  20. cls
  21. echo.
  22. echo     The line containing %1 is now deleted.   
  23. echo.
  24. echo     Press any key to see new sorted file now.
  25. pause > nul
  26. call getme
  27. goto :end
  28. :trap
  29. echo.
  30. echo   INCOMPLETE ENTRY FOR LINE DELETION.........
  31. echo.
  32. echo   Type FIXLIST, a blank space, a name or phone number 
  33. echo   you want to delete from the list. 
  34. echo   Don't use blank spaces in the name or number.
  35. echo.
  36. echo   EXAMPLE:
  37. echo   To remove "Mason, Perry.....900-555-1023" use any of these lines:  
  38. echo   FIXLIST Mason  
  39. echo   FIXLIST Perry
  40. echo   FIXLIST 555-1023 
  41. echo.
  42. echo   Note: this process is case sensitive
  43. :end